package com.zone.infrastructure.persistent.dao;

import com.zone.infrastructure.persistent.po.RaffleActivityAccountDay;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: zongzi
 * @description: 抽奖活动账户表-日次数
 * @date: 2025/2/17
 */
@Mapper
public interface IRaffleActivityAccountDayDao {


    RaffleActivityAccountDay get(@Param("userId") String userId, @Param("activityId") Long activityId, @Param("day") String day);

    int update(RaffleActivityAccountDay raffleActivityAccountDay);

    void insert(RaffleActivityAccountDay raffleActivityAccountDay);

    /**
     * 扣减日剩余次数
     *
     * @param userId
     * @param activityId
     * @param day
     * @return
     */
    int decrCountSurplus(@Param("userId") String userId, @Param("activityId") Long activityId, @Param("day") String day);
}
